package communication.common.business.device;

import communication.common.business.hole.P2pHoleRequest;
import communication.common.vertx.net.ProtocolEnum;

/**
 * 设备service
 * @author mac
 */
public interface DeviceService {

   /**
    * 转发打洞
    * @param request 打洞请求
    * @param protocolEnum  使用的通信协议
    * @throws Exception 如果目标socket不存在则抛出异常
    */
   void transferHoleRequest(P2pHoleRequest request, ProtocolEnum protocolEnum) throws Exception;

   /**
    * 打洞
    * @param request 打洞请求
    * @throws Exception 如果目标socket不存在则抛出异常
    */
   void doHole(P2pHoleRequest request) throws Exception;


}
